package com.crazyhat.crazyhat.service;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.crazyhat.crazyhat.attribute.ApprovalStatusEnum;
import com.crazyhat.crazyhat.dto.ClubApplicationDTO;
import com.crazyhat.crazyhat.entity.Application;

/**
 * <p>
 * 社团申请 服务类
 * </p>
 *
 * @author crazyhat
 * @since 2024-07-05
 */
public interface IApplicationService extends IService<Application> {

    /**
     * 申请加入社团
     * @param joinClubId 社团ID
     */
    ApprovalStatusEnum joinClub(Integer joinClubId);

    boolean checkApplication(Integer messageId, boolean approve);

    @Deprecated
    Page<Application> examineApplication(int pageNum, int pageSize);

    /**
     * 获取个人申请列表
     * @param pageNum
     * @param pageSize
     * @return
     */
    Page<Application> personalApplication(int pageNum, int pageSize);

    Page<Application> selectPage(Page<Application> page, QueryWrapper<Application> queryWrapper);


    /**
     * 获取社团的加入申请列表
     * @param clubId
     * @param getAll 是否获取全部状态的申请，是：true ，否：false
     * @return
     */
    List<ClubApplicationDTO> getApplicationList(Integer clubId,boolean getAll);
}
